Fix S6964 FN: Rule should raise in case of value type property annotated with RequiredAttribute#9313
Conversation
|
@zsolt-kolbay-sonarsource - I haven't updated the ITs yet - I prefer to get the first round of review since, for example, the message or what we raise might change. |
zsolt-kolbay-sonarsource
left a comment
There was a problem hiding this comment.
LGTM. Left one comment on the RSPEC PR that should addressed before merging this PR.
| using Microsoft.AspNetCore.Mvc; | ||
| using System; | ||
| using System.ComponentModel.DataAnnotations; | ||
| using System.Text.Json.Serialization; |
There was a problem hiding this comment.
Now that we know that [Required] doesn't affect value properties, please change this comment to:
// Compliant - the JSON serializer will throw an exception if the value is missing from the requestd91355b to
adb42e8
Compare
74c4793 to
68adace
Compare
a81af70 to
2ad3e12
Compare
|
|




Fixes #9263
RSPEC PR: https://github.com/SonarSource/rspec/pull/3942